Fix GtkEntry drawing to provide visual feedback when editable=FALSE.
authorDavid Trowbridge <trowbrds@gmail.com>
Mon, 19 Aug 2013 17:41:39 +0000 (13:41 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Mon, 19 Aug 2013 17:41:39 +0000 (13:41 -0400)
commita864f9d052aa66430b5db572b9bb740b5beeb9a8
tree94ccd4f7208fe809b8a68821438b87107a772e0b
parentd5e5616ae626fc68535984cb239f1f497dbf0048
Fix GtkEntry drawing to provide visual feedback when editable=FALSE.

GtkEntry currently draws exactly the same no matter what the state of the
'editable' property. This is pretty confusing for users because there's
no visual feedback at all, it just seems like their keyboard is broken.

This change adds a "read-only" class to the StyleContext, which will
continue to allow the user to select/copy the text, but will draw the
entry as if it were insensitive, providing some indication that the
contents can't be changed.

Signed-off-by: David Trowbridge <trowbrds@gmail.com>
http://bugzilla.gnome.org/show_bug.cgi?id=694831
gtk/gtk-default.css
gtk/gtkentry.c
gtk/gtkstylecontext.h